# 编译可执行程序

# 工具链
CPP = g++
CC = gcc
RM = rm -f
STRIP = strip

# 头文件路径
CFLAGS +=
# 第三方库
EXTLIBS =

# 编译选项
CFLAGS += -Wall -O2 -Os -g

# 系统库
LDFLAGS +=  -lc -lxmlrpc  -lxmlrpc++ -lxmlrpc_client++ -lxmlrpc_xmlparse -lxmlrpc_xmltok -lxmlrpc_abyss -lxmlrpc_util


# 需要编译的文件
SRCPATH = .
SOURCE += $(SRCPATH)/main.cpp
SOURCE += $(SRCPATH)/mcu_api.cpp
SOURCE += $(SRCPATH)/mcu_client.cpp
# SOURCE += $(SRCPATH)/gstreamer/gstreamer.cpp

EXE_OBJS = $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(SOURCE)))

TARGET = ./test

all:$(TARGET)

$(TARGET):$(EXE_OBJS) $(EXTLIBS)
	$(CPP) -o $@ $^  $(LDFLAGS)

.c.o:
	$(CC) -c $(CFLAGS) $^ -o $@

.cpp.o:
	$(CPP) -c $(CFLAGS) $^ -o $@

clean:
	$(RM) $(TARGET) $(EXE_OBJS)
